package com.feige.pojo.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * @author feige
 */
@Data
@ApiModel(value = "注册实体类")
public class RegisterFormDto {

    @NotBlank(message = "学号不能为空！")
    @ApiModelProperty(value = "学号")
    private String num;

    @NotBlank(message = "姓名不能为空！")
    @ApiModelProperty(value = "姓名")
    private String name;

    @Range(max = 1,message = "性别只有两种选择")
    @ApiModelProperty(value = "性别（1男0女）")
    private Integer sex;


    @NotBlank(message = "昵称不能为空！")
    @ApiModelProperty(value = "昵称")
    private String nickname;


    @NotBlank(message = "电话号码不能为空！")
    @ApiModelProperty(value = "电话号码")
    private String phoneNumber;


    @NotBlank(message = "用户名不能为空！")
    @ApiModelProperty(value = "邮箱")
    private String email;

    @Size(min = 6,max = 16,message = "密码长度必须为6~16位！")
    @ApiModelProperty(value = "密码")
    private String password;

    @NotBlank(message = "角色不能为空！")
    @ApiModelProperty(value = "角色")
    private String role;
}
